Skip to content

feat: pipx cli - multi framework support + OpenAI Agents + Beginner template - #557

Merged
CarsonRoscoe merged 13 commits into
mainfrom
feat/pipx-cli-multi-framework
Mar 14, 2025
Merged

feat: pipx cli - multi framework support + OpenAI Agents + Beginner template#557
CarsonRoscoe merged 13 commits into
mainfrom
feat/pipx-cli-multi-framework

Conversation

@CarsonRoscoe

@CarsonRoscoe CarsonRoscoe commented Mar 12, 2025

Copy link
Copy Markdown
Contributor

Description

This PR accomplishes the following:

  1. Refactors the CLI to handle framework selection (Langchain or OpenAI Agents SDK)
  2. Refactors the chatbot template better handle the distinction between Agentkit setup vs framework setup
  3. Added support for OpenAI Agents SDK in the chatbot template
  4. Added a --beginner flag to the CLI that allows a separate route for a beginner template
  5. Created a beginner template, which is a Base-sepolia/CDP Smart Wallet chatbot, tailored for users who are not web3 natives. The agent specifically is good at teaching users about wallets/web3, with a streamlined set of tools related to just wallets/erc20 tokens

Tests

For Reviewers: To test unpublished templates, use the --templates-path param when running locally.

i.e., to test the standard flow, run poetry run python ./create_onchain_agent/cli.py --templates-path ./templates and to test the beginner flow run poetry run python ./create_onchain_agent/cli.py --beginner --templates-path ./templates

  • Regression: Default Langchain + Base Sepolia case continues to work as expected
  • New: Test OpenAI Agents SDK case with CDP
    Screenshot 2025-03-13 at 9 54 30 AM
❯ poetry run python chatbot.py
Starting Agent...

Available modes:
1. chat    - Interactive chat mode
2. auto    - Autonomous action mode

Choose a mode (enter number or name): 1
Starting chat mode... Type 'exit' to end.

Prompt: What is your wallet and address?
Here are my wallet details:

- **Address**: 0x3463CfCbEde8404967f31b01940118557F0c3C6F
- **Network**: base-sepolia
- **Native Balance**: 0 ETH

Let me know if you need anything else!
-------------------

Prompt: 
  • New: Test OpenAI Agents SDK case with Smart Wallet
    Screenshot 2025-03-13 at 10 11 10 AM
❯ poetry run python chatbot.py
Starting Agent...

Available modes:
1. chat    - Interactive chat mode
2. auto    - Autonomous action mode

Choose a mode (enter number or name): 1
Starting chat mode... Type 'exit' to end.

Prompt: What is your wallet and address?
Here are my wallet details:

- **Address:** 0x760F29eA8bC163E85BAF1B1aB30939512d6De840
- **Network:** Base Sepolia
- **Native Balance:** 0 ETH

If you need anything else, let me know!
-------------------

Prompt: 
  • New: Test Beginner -> Langchain

Screenshot 2025-03-13 at 10 50 39 AM

❯ poetry run python chatbot.py 
Starting Agent...
Starting chat mode... Type 'exit' to end.

Prompt: What is your address and network

-------------------
Wallet Details:
- Provider: cdp_smart_wallet_provider
- Address: 0x474131654C935b3906015Cb618A46A04e0bE5057
- Network:
  * Protocol Family: evm
  * Network ID: base-sepolia
  * Chain ID: 84532
- Native Balance: 0
-------------------
My wallet address is **0x474131654C935b3906015Cb618A46A04e0bE5057**, and I am currently on the **Base Sepolia** test network. If you have any questions or need assistance with transactions, feel free to ask!
-------------------

Prompt: ^CGoodbye Agent!

~/Documents/Github/Coinbase/agentkit/python/create-onchain-agent/onchain-agent on feat/pipx-cli-multi-framework * !? 29s
❯ poetry run python chatbot.py
Starting Agent...
Starting chat mode... Type 'exit' to end.

Prompt: What is your address?

-------------------
Wallet Details:
- Provider: cdp_smart_wallet_provider
- Address: 0x474131654C935b3906015Cb618A46A04e0bE5057
- Network:
  * Protocol Family: evm
  * Network ID: base-sepolia
  * Chain ID: 84532
- Native Balance: 0
-------------------
My wallet address is **0x474131654C935b3906015Cb618A46A04e0bE5057**. I'm currently on the Base Sepolia network. If you need assistance with anything related to this wallet, feel free to ask!
-------------------

Prompt: ^CGoodbye Agent!
  • New: Test Beginner -> OpenAI Agents SDK

Screenshot 2025-03-13 at 10 52 34 AM

❯ poetry run python chatbot.py
Starting Agent...
Starting chat mode... Type 'exit' to end.

Prompt: Get me some eth and tell me your address/balance
I've received some ETH from the faucet on the Base Sepolia network! 🚀

### Wallet Details:
- **Address:** [0x0c1e89b56ce006Fc5b5FD8682e8D570B6b2b72ed](https://sepolia.basescan.org/address/0x0c1e89b56ce006Fc5b5FD8682e8D570B6b2b72ed)
- **Balance:** 0.0001 ETH

If you have any other questions or need further assistance, feel free to ask!
-------------------

Prompt: 
^CGoodbye Agent!

~/Documents/Github/Coinbase/agentkit/python/create-onchain-agent/onchain-agent on feat/pipx-cli-multi-framework * !? 31s
❯ poetry run python chatbot.py
Starting Agent...
Starting chat mode... Type 'exit' to end.

Prompt: What is your wallet address and balance?
Here's my wallet information:

- **Wallet Address:** 0x0c1e89b56ce006Fc5b5FD8682e8D570B6b2b72ed
- **Network:** Base Sepolia (test network)
- **Provider:** cdp_smart_wallet_provider
- **Native Balance:** 0.0001 ETH

On a test network like Base Sepolia, transactions use test tokens that hold no real-world value. This is perfect for development and experimentation. If you'd like to try something, feel free to ask!
-------------------

Prompt: 
^CGoodbye Agent!

Checklist

  • Added documentation to all relevant README.md files
  • Added a changelog entry

@cb-heimdall

cb-heimdall commented Mar 12, 2025

Copy link
Copy Markdown

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions github-actions Bot added documentation Improvements or additions to documentation python labels Mar 12, 2025
@CarsonRoscoe
CarsonRoscoe marked this pull request as ready for review March 13, 2025 15:14
@CarsonRoscoe
CarsonRoscoe requested a review from 0xRAG March 13, 2025 15:15
@CarsonRoscoe
CarsonRoscoe merged commit 42f717d into main Mar 14, 2025
@CarsonRoscoe
CarsonRoscoe deleted the feat/pipx-cli-multi-framework branch March 14, 2025 02:36
chenciao8 added a commit to TradeOnDESK/agentkit that referenced this pull request Mar 19, 2025
* feat: GHA Publish coinbase-agentkit-openai-agents-sdk to PyPI (coinbase#551)

* feat: python openai agents sdk support (coinbase#550)

* feat: initial commit

* chore: unit tests

* chore: updated readmes

* chore: updated to live openai-agents package

* fix: fix params schema to conform to openai requirements

* chore: updated README in /python

* chore: generated changelog changes (coinbase#552)

* chore: add next-template to workspaces (coinbase#544)

* chore: add next-template to workspaces

* chore: fix lint in next template

* chore: generated changeset

* chore: reverted img change

---------

Co-authored-by: CarsonRoscoe <carsonroscoe7@gmail.com>

* chore: python bump cdp sdk version (coinbase#554)

* chore: bump cdp-sdk version from 0.19.0 to 0.21.0 in python

* chore: generated changelog

* chore: generate changelog changes & bump coinbase-agentkit version

* Update README.md (coinbase#555)

* feat: model context protocol example (coinbase#546)

* feat: initial commit

* feat: working claude example

* chore: removed wallet read/writes

* chore: updated README

* chore: added examples to parent READMEs

* chore: format/lint

* chore: added build to ignore

* fix: package dependencies

* chore: change build folder to dist

* chore: package-lock

* chore: fixed package-lock.json

* chore: removed dotenv dependency

* chore: removed moduleResolution from tsconfig

* fix: package-lock

* pr feedback

* chore: lint format

* fix: package-lock

* fix: claud config arg for server location

* feat: pr feedback

* feat: npm cli - multi framework + Vercel AI SDK (coinbase#548)

* feat: initial commit

* fix: handleNextSelection call

* chore: format and lint

* chore: updated comments

* chore: changelog

* chore: updated readmes

* chore: added todo and removed MCP from Framework list for now

* chore: removed references to mcpServer and MCP. Will readd in its own PR

* chore: updated package-lock

* chore: removed missed mcpServer reference

* chore: lint

* chore: infer types from constants (coinbase#559)

* feat(python): add allora network price inference (coinbase#110)

* fix typo: OpenSeas to OpenSea (coinbase#564)

* fix typo (coinbase#563)

* feat: pipx cli - multi framework support + OpenAI Agents + Beginner template (coinbase#557)

* chore: refactored chatbot into prepare_agent, create_agent and chatbot

* feat: added openai agents sdk

* chore: pyproject.toml dependencies depends on framework selected

* fix: openai agents sdk dependencies

* feat: added paymaster comment to smart wallet scenario

* feat: added introduction template

* feat: cleaned up beginner template

* feat: changed --mode=beginnner arg to --beginner flag

* feat: improved wallet persistance and beginner flag

* chore: changelog

* chore: updated README

* chore: lint

* chore: updated beginner README

* feat(ts): defillama action provider (coinbase#513)

* feat(ts): defillama action provider (coinbase#316)

* feat(ts): defillama action provider refinements (coinbase#513)

---------

Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>

* chore: rm changelog workflow (coinbase#570)

* chore: add mcp template (coinbase#568)

* fix: readded missing .env.local file (coinbase#567)

* feat(py): hyperbolic action provider (coinbase#531)

* feat(py): hyperbolic action provider (coinbase#154)

* feat(py): hyperbolic action provider 0.1.0 migration (coinbase#509)

* feat(py): hyperbolic action provider refinements (coinbase#531)

---------

Co-authored-by: Kai Huang <kaihuang724@gmail.com>
Co-authored-by: Amr Elhady <theamrelhady@gmail.com>

* chore: fix nightly (coinbase#571)

* feat(create-onchain-agent): add mcp to typescript cli (coinbase#569)

* fix: Morpho Deposit Atomic Unit Conversion (coinbase#573)

* fix: Morpho Deposit Atomic Unit Conversion

* changesets

* chore: rm allora-sdk from example deps (coinbase#574)

* chore: added readme tip to surpress warning (coinbase#575)

* chore: added readme tip to surpress warning

* chore: added tip to agents example readme

* chore: version typescript packages (coinbase#576)

* chore: version python packages (coinbase#577)

* New SVGs in readme (coinbase#578)

* Add files via upload

* Add files via upload

* Update README.md

* Update README.md

* Update defillama.svg

* chore: add changesets action to automate version and publish (coinbase#582)

* feat: added gasless transfers for USDC/CBBTC on Base/Base-Sepolia (coinbase#584)

* docs: update broken links (coinbase#586)

---------

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: Carson Roscoe <CarsonRoscoe7@gmail.com>
Co-authored-by: Ryan Gilbert <ryangilbert7926@gmail.com>
Co-authored-by: Olexandr88 <radole1203@gmail.com>
Co-authored-by: fernandofcampos <fernandofcampos@gmail.com>
Co-authored-by: Oğuzhan Oğuz <46710637+ozzy35410@users.noreply.github.com>
Co-authored-by: Chris Gerber <csgerber@gmail.com>
Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>
Co-authored-by: Kai Huang <kaihuang724@gmail.com>
Co-authored-by: Amr Elhady <theamrelhady@gmail.com>
Co-authored-by: murrlincoln <65836530+murrlincoln@users.noreply.github.com>
Co-authored-by: Cypher Pepe <125112044+cypherpepe@users.noreply.github.com>
EdsonAlcala pushed a commit to EdsonAlcala/agentkit that referenced this pull request Mar 21, 2025
…emplate (coinbase#557)

* chore: refactored chatbot into prepare_agent, create_agent and chatbot

* feat: added openai agents sdk

* chore: pyproject.toml dependencies depends on framework selected

* fix: openai agents sdk dependencies

* feat: added paymaster comment to smart wallet scenario

* feat: added introduction template

* feat: cleaned up beginner template

* feat: changed --mode=beginnner arg to --beginner flag

* feat: improved wallet persistance and beginner flag

* chore: changelog

* chore: updated README

* chore: lint

* chore: updated beginner README
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation python

Development

Successfully merging this pull request may close these issues.

3 participants